/*
 * @Author: lqx
 * @Date: 2022-04-21 17:50:52
 * @LastEditors: lqx
 * @LastEditTime: 2022-04-26 17:19:45
 * @Description: 辅助类处理函数
 */
import {
    v4 as uuidv4
} from 'uuid'
export default {
    // 设置唯一标识ID
    setUuid() {
        return uuidv4();
    },
    // 设置基础字号 res-代表倍数
    setFontsize(res) {
        const docEl = document.documentElement;
        const clientWidth = window.innerWidth || docEl.clientWidth || document.body.clientWidth;
        if (!clientWidth) return;
        const fontSize = 100 * (clientWidth / 1920);
        return res * fontSize;
    }
}